<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="keywords" content="#{$config.keywords}"/>
    <meta name="description" content="#{$config.description}"/>
    <link href="#{$favicon}?v=#{$app.version}" rel="icon">
    <link rel="stylesheet" href="/assets/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/static/font/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/assets/static/css/i.css?v=#{$app.version}">

    <script src="/assets/static/jquery.min.js"></script>
    <script src="/assets/static/jquery.sliderBar.js"></script>
    <script src="/assets/static/layer/layer.js"></script>
    <script src="/assets/static/pay.js?v=#{$app.version}"></script>
    <script src="/assets/static/clipboard.js"></script>
    <title>#{$config.title}</title>
    <!--start::HOOK-->
    #{hook(\App\Consts\Hook::USER_GLOBAL_VIEW_HEADER)}
    #{hook(\App\Consts\Hook::USER_VIEW_INDEX_HEADER)}
    <!--end::HOOK-->
</head>
<body style="background: url('#{$config.background_url}') fixed no-repeat;background-size: cover;">
<div id="app">
    <nav class="navbar navbar-expand-lg navbar-light bg-light"
         style="background-color: rgba(255,255,255,0.85) !important;">
        <div class="container">
           <div class="navbar-brand">
               <a href="#{if $user}/user/dashboard/index#{else}/#{/if}">
                   <img src="#{if $user.avatar}#{$user.avatar}#{else}#{$favicon}#{/if}" height="30px" style="border-radius: 50%;box-shadow: #f0d1d4 1px 1px 1px;">
                   #{if $user}<span style="position: relative;top: 4px;left: 3px;font-weight: bold;color: #1396558a;"> #{$user.username}  #{else} <span style="position: relative;top: 4px;left: 3px;font-weight: bold;color: #1396558a;">  #{$config.shop_name}  #{/if}
               </span></a>
                #{if $user}
               <a href="/user/dashboard/index"><span style="position: relative;top: 4px;left: 10px;font-size: 14px;font-weight: bold;color: #7be7bfd9;"><i class="fa fa-yen"></i>#{$user.balance}</span></a>
               #{else}  <a href="/user/authentication/login?goto=/"><span style="position: relative;top: 4px;left: 10px;font-size: 18px;color: #79b9fbbd;font-weight: bold;"><i class="fa fa-sign-in"></i> 登录</span></a> #{/if}
           </div>
            <div class="row">
                <a class="nav-link" href="/" style="font-weight: bolder;"><i class="fa fa-shopping-cart" aria-hidden="true"></i>  购物</a>
                <a class="nav-link" href="/user/index/query"  style="font-weight: bolder;"><i class="fa fa-search-plus" aria-hidden="true"></i> 查订单</a>
            #{if $config.service_url}<a class="nav-link" href="#{$config.service_url}" target="_blank"  style="font-weight: bolder;"><i class="fa fa-twitch" aria-hidden="true"></i> 在线客服</a>#{/if}
                #{foreach hook(\App\Consts\Hook::USER_VIEW_HEADER_NAV) as $item}
                    <a class="nav-link" href="#{$item.url}" style="font-weight: bolder;" target="#{$item.target}"><i class="#{$item.icon}" aria-hidden="true"></i>  #{$item.name}</a>
                #{/foreach}
            </div>
            <!--<div class="navbar-collapse">
                <ul class="navbar-nav mr-auto"></ul>
            </div>-->
        </div>
    </nav>